package com.example.mapper;

import com.example.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

/**
 * @version 1.0
 * @Author wql
 * @Date 2024/5/30
 * @Description
 */
@Mapper
public interface UserMapper {
    //主键返回
    @Options(keyProperty = "id",useGeneratedKeys = true)
    @Insert("insert into homework.user ( username, password,phone, create_time) VALUES (#{username},#{password},#{phone},now())")
    void insert(User user);
}
